import request from '@/utils/request'

// 查询基金分配-分配详情列表
export function listFundFpDetails(query) {
  return request({
    url: '/fp/fundFpDetails/list',
    method: 'get',
    params: query
  })
}

// 根据分配ID，获取根据出资人分组后数据
export function listDetailGroupInvestor(query) {
  return request({
    url: '/fp/fundFpDetails/listDetailGroupInvestor',
    method: 'get',
    params: query
  })
}

// 查询基金分配-出资人分配明细
export function listfundInvestorFpDetails(query) {
  return request({
    url: '/fp/fundFpDetails/listfundInvestorFpDetails',
    method: 'get',
    params: query
  })
}

// 查询基金分配-分配详情详细
export function getFundFpDetails(id) {
  return request({
    url: '/fp/fundFpDetails/' + id,
    method: 'get'
  })
}

// 保存基金分配-分配详情
export function saveFundFpDetails(data) {
  return request({
    url: '/fp/fundFpDetails/save',
    method: 'post',
    data: data
  })
}

export function saveMain(data) {
  return request({
    url: '/fp/fundFpDetails/saveMain',
    method: 'post',
    data: data
  })
}

// 删除基金分配-分配详情
export function delFundFpDetails(id) {
  return request({
    url: '/fp/fundFpDetails/' + id,
    method: 'delete'
  })
}

// 删除基金分配-分配详情
export function delFundFpDetailsByInvestorId(data) {
  return request({
    url: '/fp/fundFpDetails/delByInvestorId',
    method: 'delete',
    data: data
  })
}

// 导出基金分配-分配详情
export function exportFundFpDetails(query) {
  return request({
    url: '/fp/fundFpDetails/export',
    method: 'get',
    params: query
  })
}

// Request method 'GET' not supported
export function getDetailsBasedOnTheInvestorId(query) {
  return request({
    url: '/fp/fundFpDetails/getDetailsBasedOnTheInvestorId',
    method: 'get',
    params: query
  })
}
